<?php 
class MProduct extends CI_Model {
	public function __construct()
	{
	   parent::__construct();
	   $this->load->database();
	   //Do your magic here
	}

	/**
	*  Show product reslt
	* @param $KeyWord : từ khóa cần tìm kiếm. 
	**/
	public function SearchProduct($KeyWord) {
		$result=$this->db->query("SELECT product_id,name,image FROM product WHERE name LIKE '%$KeyWord%'");
		return $result->result_array();
	}

}


 ?>